import static java.lang.System.out;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-09-25  21:53
 */
public class Fight {
    public static void main(String[] args) {
        Tank tank1 = new Tank();
        Tank tank2 = new Tank();
        tank1.setBulletAmount(10);
        tank2.setBulletAmount(20);
        System.out.println("tank1炮弹数量：10" );
        System.out.println("tank2炮弹数量：20");
        System.out.println("tank1目前的速度：" + tank1.speed);
        System.out.println("tank2目前的速度：" + tank2.speed);
        tank1.speedUp(tank1.speed);
        tank2.speeddown(tank1.speed);
        System.out.println("tank1目前的速度：" + tank1.speed);
        System.out.println("tank2目前的速度：" + tank2.speed);
        System.out.println("tank1开火：");
        tank1.fire();
        System.out.println("tank1剩余炮弹：" + tank1.bulletaAmount);
        System.out.println("tank2开火：");
        tank2.fire();
        tank2.fire();
        System.out.println("tank2剩余炮弹：" + tank2.bulletaAmount);

    }
}
